<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个人信息</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="/Public/admin/cache/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/admin/css/personal.css" media="all">
</head>
<body>
<section class="layui-larry-box">
	<div class="larry-personal">
		<header class="larry-personal-tit">
			<span>编辑角色组</span>
		</header><!-- /header -->
		<div class="larry-personal-body clearfix">
			<form class="layui-form col-lg-10" action="/admin/auth/group_edit" method="post">
				<input type="hidden" name="id" value="<?php echo ($group_data['id']); ?>">
				<div class="layui-form-item">
					<label class="layui-form-label">角色组名</label>
					<div class="layui-input-block">
						<input type="text" name="title"  autocomplete="off" value="<?php echo ($group_data['title']); ?>" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">选择规则</label>
					<div class="layui-input-block">
						<?php if(is_array($rule_list)): foreach($rule_list as $key=>$rules): ?><div class="layui-collapse">
							  <div class="layui-colla-item">
							    <h4 class="layui-colla-title"><?php echo ($key); ?></h4>
							    <div class="layui-colla-content">
							    	<?php if(is_array($rules)): $i = 0; $__LIST__ = $rules;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rulelist): $mod = ($i % 2 );++$i; if(in_array(($rulelist['id']), is_array($group_rule)?$group_rule:explode(',',$group_rule))): ?><input type="checkbox" name="rules[<?php echo ($rulelist['id']); ?>]" title="<?php echo ($rulelist['title']); ?>" checked="">
							    		<?php else: ?>
							    			<input type="checkbox" name="rules[<?php echo ($rulelist['id']); ?>]" title="<?php echo ($rulelist['title']); ?>"><?php endif; endforeach; endif; else: echo "" ;endif; ?>
							    </div>
							  </div>
							</div><?php endforeach; endif; ?>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">是否启用</label>
					<div class="layui-input-block">
						<?php if(($group_data['status'] == 1)): ?><input type="radio" name="status" value="1" title="是" checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><span>是</span></div>
							<input type="radio" name="status" value="0" title="否"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><span>否</span></div>
						<?php else: ?>
							<input type="radio" name="status" value="1" title="是"><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><span>是</span></div>
							<input type="radio" name="status" value="0" title="否" checked=""><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><span>否</span></div><?php endif; ?>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</section>
<script type="text/javascript" src="/Public/admin/cache/layui.js"></script>
<script type="text/javascript">
	layui.use(['form','element', 'layer'],function(){
         var form = layui.form();
         var element = layui.element();
  		 var layer = layui.layer;
	});
</script>
</body>
</html>